package com.sxz.mall.common.exception;

//错误信息错误码枚举
public enum BizCodeEnum {

    /**
     * 10通用的
     * 11商品
     * 12订单
     * 13购物车
     * 14物流
     */


    PRODUCT_UP_EXCEPTION(11001, "商品上架异常"),
    UNKNOWN_EXCEPTION(10000, "系统知异常"),
    VALID_SMS_EXCEPTION(10002, "短信发送频率太高,稍等一会儿再发送"),
    VALID_EXCEPTION(10001, "参数格式异常"),
    USERNAME_EXIST_EXCEPTION(15001, "用户名已存在"),
    PHONE_EXIST_EXCEPTION(15002, "手机号已注册"),
    NO_STOCK_EXCEPTION(14001, "商品锁定库存失败"),
    USERNAME_PHONE_VALID_EXCEPTION(15003, "账号或密码错误");




    private int code;
    private String msg;

    BizCodeEnum(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode(){
        return code;
    }

    public String getMsg(){
        return msg;
    }
}
